SimulateMemoryPerAllocationLimit

Simulates the maximum amount of memory available to the application for each allocation attempt.

Note: This statement simulates physical memory at the operating system level and may cause runtime environments, such as .NET Framework, to behave unexpectedly.

Syntax

SimulateMemoryPerAllocationLimit(MaxMegabytesPerAllocation)

Arguments

Argument Description
MaxMegabytesPerAllocation Maximum number of megabytes allowed per allocation. Use floating point values for fractions or SimulationOff to turn off the simulation.

Example

SimulateMemoryPerAllocationLimit(0.1)

Window("WysiCorp CRM").Menu("MenuBar").Select("File/Open")

Window("Open File").Combobox("FileName").SetText("LargeFile.DAT")

Window("Open File").Button("Open").Click()

Window("Error: out of memory").CheckExists()

SimulateMemoryPerAllocationLimit(SimulationOff)